package com.jial08.designpatterns.decorate;

/**
 * <p>类描述：抽象煎饼装饰器。</p>
 *
 * @author jl
 * @version v1.0.0.1。
 * @since JDK1.8。
 * <p>创建日期：2019/10/17 下午1:01。</p>
 */
public abstract class AbstractPancakeDecorator implements Pancake  {
	private Pancake pancake;

	public AbstractPancakeDecorator(Pancake pancake) {
		this.pancake = pancake;
	}

	@Override
	public void cook() {
		if (pancake != null) {
			pancake.cook();
		}
	}
}
